package org.mtmi.ui.controls.midi;

import java.util.ArrayList;
import java.util.List;

import org.mtmi.ui.M;
import org.mtmi.ui.actions.ActionFactory;
import org.mtmi.ui.actions.IAction;
import org.mtmi.ui.edit.AbstractSourceControlConnector;
import org.mtmi.ui.edit.ControlEditorAdapter;

public class MidiControllerControlEditor extends ControlEditorAdapter
{
	private MidiController control;
	
	public MidiControllerControlEditor( MidiController mc ) {
		control = mc;
	}
	
	@Override
	public List<IAction> getControlActions() {
		ArrayList<IAction> actions = new ArrayList<IAction>();
		actions.add( ActionFactory.MIDI_CHANGE_OUTPUT );
		actions.add( ActionFactory.MIDI_CHANGE_CHANNEL );
		actions.add( ActionFactory.MIDI_CHANGE_CONTROLLER );
		actions.add( ActionFactory.MIDI_CHANGE_VALUE );
		return actions;
	}
	
	@Override
	public List<AbstractSourceControlConnector> getControlConnectors() {
		ArrayList<AbstractSourceControlConnector> cnc = new ArrayList<AbstractSourceControlConnector>();
		cnc.add( new MidiControllerValueConnector(control, M.SCENE_CONTROL) );
		return cnc;
	}
}
